package com.Utils;

/**
 * 强制转换工具
 */
public class CastTypeUtils {
    public static void strToInt() {
        String string = "2021年";
        System.out.println("\n\n\n\n字符串转整形：");
        int value = Integer.parseInt(string.substring(0, 4));
        while (value != 2000) System.out.println(value--);
    }
}
